Skip to main content

What’s New

Qrvey 8.5
Version 8.5 (LTS) of the Qrvey platform is now available to customers. This version includes several new features and performance improvements.
Learn More
End-of-life Schedule
We've added a new article that lists the features and endpoints that have been scheduled for deprecation. All features and endpoints will be supported for (1) year after the release date of the LTS version that contains the alternative.
Learn More
NodeJS Deprecation
AWS has announced that it is deprecating NodeJS 12, 14, and 16. To avoid any issues as a result of this deprecation, upgrade your instances of the Qrvey platform as described in this announcement.
Learn More
Version: 8.5

Dashboard View Widget

The Dashboard View widget enables you to embed one or more dashboards or a mashup of several charts, maps, and metrics into your application.

Note: The Dashboard View widget replaces the Page View widget in Qrvey version 8.0 and later.

Before You Begin

Get the Helper Code

  1. In Qrvey Composer, open Dashboard Builder and display the Dashboard list.

  2. Select one of the following options:

    a. To embed all dashboards in the application, click the Embedding Options button in the upper right corner of the page, and then click Embed Dashboard View.

    page-view-widget

    b. To embed a single dashboard, click its three-dot menu in the Dashboard list, point to Embed, and then click Embed Dashboard View.

    page-view-widget

  3. A dialog displays with an HTML tag, a JSON configuration object, and the Widget Launcher script tag.

  4. Click Copy to copy the code, and then paste it into your preferred editor.

Embed the HTML Tag

Identify where you would like this widget to display in your application, and then add the HTML tag in that location.

The HTML tag for this widget is:

<qrvey-end-user settings="config"></qrvey-end-user>

Embed the Widget Launcher Script Tag

Add the widget launcher script tag to your application.

For reference, the launcher script code is:

<script type="text/javascript" src="https://<WIDGETS_URL>/widgets-launcher/app.js"></script>

Set Properties in the JSON Configuration Object

Define the JSON configuration object by starting with the script provided in the helper code, and then adding additional configuration properties as needed. The script provided contains only the required properties. For reference, an example is copied below. To use this code in your application, replace the values in brackets (“<>”) with your own values:

<script>
var config = {
"api_key": "<YOUR_PRIVATE_API_KEY>",
"domain": "https://your_qrvey_domain",
"user_id": "<USER_ID>",
"dashboard_id": "<DASHBOARD_ID>", // Optional. Embeds the specified dashboard only.
"app_id": "<APPLICATION_ID>"
}
</script>

When complete, add the JSON configuration object to your application.

General Properties

The following table lists the properties associated with this widget.

PropertyValueRequired
api_keyString, Your organization’s unique API key required to access the Qrvey platform. Never expose your organization’s API key to external users. In Production environments, use a secure token (qv_token) to encrypt the API key.Yes, if the qv_token is not provided
qv_tokenString, A secure token encrypted via JWT to authenticate and authorize embedded widgets. Establishes a secure connection between the host application and the Qrvey system. For more information, see Embedding Widgets Using a Security Token.Yes, if the api_key is not provided
app_idString, ID of the Qrvey application containing the dashboard, report, automation, or web form.Yes
domainString, The base URL of your instance of the Qrvey platform.Yes
user_idString, ID of the Qrvey Composer user that owns the application that is being embedded. Optional: You can alternately specify the user ID in a Qrvey session cookie.Yes, if the user_id is not included in a session cookie
group_listArray<String>, collection of IDs/names of the groups created in User Management.No
page_idString, ID of one page to visualize it: all auth process is still required if the configuration exists.No
userFiltersArray<Object>, collection of custom filters that the system will apply to the visualized data. Please see Working With Filters in Embedded Scenarios for more details on how to create a filter object.No
filter_panel_default_viewString, Decides the default state of the side filter panel, if it’s been added to the view. It can be set to ‘open’ or ‘closed’. The default value is closed.No
fit_panel_buttonBoolean, Show the fit to panel button on the panels. Default value is true.No
personalizationObject, JSON object to configure and overwrite the default personalization settings. Please see the section about Configuring End User Personalization for more details.No
stylesObject, JSON object configuring style options that can be used to override the default styles, allowing for while-labeling the widget. Please see the Overriding the Default Styles section for more details.No
featurePermissionObject, JSON object to configure which features are or are not available in the widget. Presently it only supports showing and hiding of the pages bar, where the pages appear as tabs at the bottom of the widget.*
The object’s structure is:
featurePermission:{
  pagesAndApplication{
   hidePagesBar: true // or false (default)
  }
}
No
customTokensObject, JSON object used to set custom threshold values in Bullet and Dial charts. For more information, see Using Custom Tokens.No
clientidString, Unique identifier for the tenant end user. Required for using the End User Personalization and Download Manager features. The clientid must be set to a unique value for each tenant end user.Yes, for certain features
authenticatedSession.emailString, Specifies the email address to associate with the widget. If an address is not specified, exports are sent to the email address associated with the user ID.No
themeidString, theme ID to use in the componentNo

Showing and Hiding Features

In the Dashboard View widget, the featurePermission object enables you to create a customized view by showing and hiding specific features. The properties table below lists all the features that you can show or hide.

featurePermission object properties

The following table describes the properties of the featurePermission object.

PropertyDescriptionTypeDefaultRequired
featurePermissionMain property of this featureObjectN/ANo
navigationDefine navigation-related features that can be hiddenObjectN/ANo
hideNavigationTabHide the entry method to the navigation tab in the top bar of the widgetBooleanfalseNo
userManagementDefine user management related features that can be hiddenObjectN/ANo
hideUserManagementTabHide the entry method to the user management tab in the top bar of the widgetBooleanfalseNo
pagesAndApplicationDefine pages and application-related features that can be hiddenObjectN/ANo
hidePublishAppButtonHide button “Unpublish”/”publish application”BooleanfalseNo
hidePublishPageButtonHide button “publish page”BooleanfalseNo
hideCopyPageLinkHide the UI interfaces where the user can get the link of a pageBooleanfalseNo
hideLaunchButtonHide the button to access the page viewBooleanfalseNo
hideCreateManagePagesHide all options to create pagesBooleanfalseNo
hidePageStatusHide Text “status”BooleanFalseNo
hidePagesBarHide bottom bar pagesBooleanFalseNo
LiteVersionHide all elements that are managed by feature permissionsBooleanfalseNo
canvasDefine canvas related features that can be hiddenObjectN/ANo
hideManageCanvasHide the following options: Grid, Responsive View, Discard ChangesBooleanfalseNo
downloadsDisplays the download access points in the widgetBooleanfalseNo
downloads.hideScheduleHides the scheduling export option in the export modalBooleantrueNo

Tip: To hide all features, set the Liteversion property to true. For example:

widgetConfig = {
domain: "DOMAIN",
appid: "APP_ID",
userid: "USER_ID",
featurePermission: {
liteVersion: true,
},
}

Tip: To hide most features, set the Liteversion property to true and list the exceptions you want to show to false. For example:

widgetConfig = {
domain: "DOMAIN",
appid: "APP_ID",
userid: "USER_ID",
featurePermission: {
liteVersion: true,
userManagement:{
hideUserManagementTab: false
}
},
}

Subscription Settings

In the Dashboard View widget, you can enable end users to subscribe to a scheduled delivery of exported dashboards or specific charts. For more information on using subscriptions, see Subscribing to Exports.

To enable the User Subscriptions option in the Dashboard View widget, set the enable_subscriptions property to true. For example:

subscriptions_settings: {
enable_subscriptions: true
}

Note: The Subscriptions feature relies on the user being authenticated and needs the clientid property set for the logged-in user. The property’s value should represent a unique identifier for each end user.

subscriptions_settings object properties

The following table describes the properties of the subscription_settings object.

PropertyDescriptionTypeDefaultRequired
enable_subscriptionsToggle the visibility of the User Subscriptions alarm bell. When disabled, subscriptions are not available to the end user.booleantrueNo
emailsEmail addresses to deliver the exports to.Array<Object>N/ANo
allow_editing_recipientsEnables the end user to modify the list of recipients of the export.booleanN/ANo
email_messageJSON object to configure the email message. See below for the structure.ObjectN/ANo

The structure of the email_message object is:

email_message: 
{
hide_add_subject: true/false,
hide_add_message: true/false
}

Configuring End User Personalization

In the Dashboard View widget, all authenticated users can personalize their view by default. You can use the personalization object to configure and override the personalization settings.

To turn personalization off for all users, set the enabled property to false. For example:

widgetConfig = {
domain: "DOMAIN",
appid: "APP_ID",
userid: "USER_ID",
personalization: {
enabled: false,
},
}

Note: The End User Personalization feature relies on the user being authenticated and needs the clientid property set for the logged-in user. The property’s value should represent a unique identifier for each end-user, as Qrvey uses it as a key to store any personalization made. Using the same clientid value for multiple end-users will result in the users’ personalized versions being overridden by each other. See the Embedding Widgets Using a Security Token property set for the logged-in user.

personalization object properties

The following table describes the properties of the personalization object.

PropertyDescriptionTypeDefaultRequired
enabledTurn personalization on/off for end users. When disabled, all of the properties in the personalization object, other than the fit_panel_button property will be omitted.booleantrueNo
add_filterWhen set to true, all “add filter” buttons will be visible to allow users to create new filters from the filter modal, the filter panel, and filter interactivity page components.booleantrueNo
edit_chartAllow authenticated users to edit charts by clicking the “Edit” button in the panels' three-dot menu.booleantrueNo
download_dataAllow users to download the page and panel data in CSV and PDF formatsbooleantrueNo
edit_pageAllow authenticated users to go into edit mode, where the page builder widget will be displayed. Users will see an “edit page” icon in the floating three-dot menu.booleantrueNo
remove_chartAllow users to remove charts from the page, when in edit modebooleantrueNo
rearrange_chartAllow users to rearrange the chart panels, when in edit modebooleantrueNo

Overriding the Default Styles

In the Dashboard View widget, you can override CSS settings for white-labeling purposes.

When using the styles object, house the properties inside the pageView object. For example:

        styles: {
pageView: {
canvasTextFontFamily: 'Roboto, sans-serif',
canvasTextFontWeight: 'normal',
canvasTextFontSize: '12px',
canvasTextFontColor: 'blue',
canvasTextBackgroundColor: 'white',
canvasTextAlign: 'left'
}
}

styles object properties

The following table describes the properties of the styles object.

PropertyValuesTarget
canvasButtonBackgroundColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'button
canvasButtonFontColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'button
canvasDatepickerFontFamilyGroups of values:
'Roboto, sans-serif'
'Georgia, serif'
'Palatino Linotype, Book Antiqua, Palatino, serif'
'Times New Roman, Times, serif'
'Arial, Helvetica, sans-serif'
'Arial Black, Gadget, sans-serif'
'Comic Sans MS, cursive, sans-serif'
'Impact, Charcoal, sans-serif'
'Lucida Sans Unicode, Lucida Grande, sans-serif'
'Tahoma, Geneva, sans-serif'
'Trebuchet MS, Helvetica, sans-serif'
'Verdana, Geneva, sans-serif'
'Courier New, Courier, monospace'
'Lucida Console, Monaco, monospace'
datepicker
canvasDatepickerFontColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'datepicker
canvasDatepickerIconSelectorsColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'datepicker
canvasValuelistFontFamilyGroups of values:
'Roboto, sans-serif'
'Georgia, serif'
'Palatino Linotype, Book Antiqua, Palatino, serif'
'Times New Roman, Times, serif'
'Arial, Helvetica, sans-serif'
'Arial Black, Gadget, sans-serif'
'Comic Sans MS, cursive, sans-serif'
'Impact, Charcoal, sans-serif'
'Lucida Sans Unicode, Lucida Grande, sans-serif'
'Tahoma, Geneva, sans-serif'
'Trebuchet MS, Helvetica, sans-serif'
'Verdana, Geneva, sans-serif'
'Courier New, Courier, monospace'
'Lucida Console, Monaco, monospace'
valuelist
canvasValuelistFontColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'valuelist
canvasValuelistIconSelectorsColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'valuelist
canvasTextFontFamilyGroups of values:
, sans-serif'
'Georgia, serif'
'Palatino Linotype, Book Antiqua, Palatino, serif'
'Times New Roman, Times, serif'
'Arial, Helvetica, sans-serif'
'Arial Black, Gadget, sans-serif'
'Comic Sans MS, cursive, sans-serif'
'Impact, Charcoal, sans-serif'
'Lucida Sans Unicode, Lucida Grande, sans-serif'
'Tahoma, Geneva, sans-serif'
'Trebuchet MS, Helvetica, sans-serif'
'Verdana, Geneva, sans-serif'
'Courier New, Courier, monospace'
'Lucida Console, Monaco, monospace'
textbox
canvasTextFontWeightAll CSS supported values (names of numbers)
'bold', 'bolder', 200, 400
textbox
canvasTextFontSizeAll CSS supported values
'10px', '10em', '10rem', '10%', 'large', 'small'
textbox
canvasTextFontColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'textbox
canvasTextBackgroundColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'textbox
canvasTextAlignright, 'center', 'left'textbox
canvasImageAspect‘cover’, ‘contain’, ‘fill’image
navigationBackgroundColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'navigation bar
navigationElementsColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'navigation bar
tabsBackgroundColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'tabs bar
tabsFontColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'tabs bar
tabsBorderColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'tabs bar
tabSizeAll CSS supported values'10px', '10em', '10rem', '10%'tabs bar
selectedTabBarColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'tabs bar
canvasBackgroundColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'page
pageViewButtonBackgroundColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'floating button (bottom right)
pageViewButtonIconColorAll CSS supported values (color names or Hex), '#000000', 'green', 'GREEN'floating button (bottom right)

Events

The widget supports custom events to update keys of the configuration, you can dispatch an event using your own user interface to modify the behavior.

  • atApplyUserFilters: Enables changes to the builderFilters property - the expected value for this property is a reduced version of the filter object. This property is a collection of objects that includes:
    • Operator: defines which operation will be performed with the expressions.
    • Expressions: a collection of objects that contains the questions/column reference, the type of operation applied to the questions, and the values that will be used for filtering.

Code Samples

The following samples demonstrate how this widget can be used in an HTML page.

ImplementationDescriptionFront-end CodeBack-end Code
Basic API KeyThis sample uses a basic API key to embed a full Dashboard View widget. It does not encrypt the API key and is not suitable for production environments.codepenn/a
Basic API Key - Single ReportThis sample uses a basic API key to embed a single Dashboard View widget. It does not encrypt the API key and is not suitable for production environments.codepenn/a
CSS InjectionThis sample uses a basic API key and custom CSS to embed a single Dashboard View widget. It does not encrypt the API key and is not suitable for production environments.codepenn/a